package com.apache.uct.dao;

import com.apache.database.db.DaoImpl;

public class DeptDaoImpl extends DaoImpl {

	public String getSql(int type) {
		String sql = "";
		switch (type) {
		case 1:
			sql = "select count(*) from Dept where 1=1 ";
			break;
		case 2:
			sql = " from Dept where 1=1 ";
			break;
		case 3:
			sql = " select count(*) from Dept where deptEname=:deptEname and orgId=:orgId ";
			break;
		case 4:
			sql = " from Dept where fatherId=:fatherId and orgId in(select dataKey from DataRight where userId=:userId and dataName='org') order by fullEname";
			break;
		case 5:
			sql = " from Dept where deptId in(select dataKey from DataRight where userId=:userId and dataName=:dataName) ";
			break;
		default:
			sql = "select count(*) from Dept where 1=1 ";
		}
		return sql;
	}

	public void initSystemCache() {
	}
}
